package com.newasia.user.dto;

import com.newasia.commons.result.AbstractRequest;
import com.newasia.commons.tool.exception.ValidateException;
import com.newasia.user.constants.SysRetCodeConstants;
import lombok.Data;

@Data
public class AreaListRequest extends AbstractRequest{

    private Integer parentId;

    @Override
    public void requestCheck() {
        if(parentId==null){
            throw new ValidateException(
                    SysRetCodeConstants.REQUEST_CHECK_FAILURE.getCode(),
                    SysRetCodeConstants.REQUEST_CHECK_FAILURE.getMessage());
        }
    }
}
